Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update authorization examples #1651

Conversation

panteliselef
Copy link
Member

@panteliselef panteliselef commented Oct 24, 2024

Next.js warns users against performing authorization checks in layouts. More info here.

This PR

  • adds a warning callout to examples that perform authz checks in layouts
  • updates authz examples to have better explanations and more code comments
  • updates broken examples (all examples in both of these docs were tested)

@panteliselef panteliselef self-assigned this Oct 24, 2024
@panteliselef panteliselef requested a review from a team as a code owner October 24, 2024 16:42
Copy link

Hey, here’s your docs preview: https://clerk.com/docs/pr/1651

@panteliselef panteliselef force-pushed the elef/sdki-709-update-auth-documentation-to-not-recommend-protection-in branch from 0037a16 to 0d17b6c Compare October 24, 2024 16:46
@alexisintech alexisintech changed the title Replace example with auth in a layout Update authorization examples Oct 24, 2024
@alexisintech alexisintech marked this pull request as draft October 24, 2024 22:20
@alexisintech
Copy link
Member

waiting to hear if auth.protect() is still considered experimental: https://clerkinc.slack.com/archives/C05GH6N5LLS/p1729803133230429

if it is, we can revert the callouts to mention that it is considered experimental.

@alexisintech alexisintech marked this pull request as ready for review October 25, 2024 22:21
@alexisintech alexisintech merged commit a123093 into main Oct 25, 2024
3 checks passed
@alexisintech alexisintech deleted the elef/sdki-709-update-auth-documentation-to-not-recommend-protection-in branch October 25, 2024 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants